import 'package:lai_zhan/common/model/shopResult/shop_result.dart';
import 'package:lai_zhan/common/model/activity/activity.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:redux/redux.dart';

/**
 * 活动信息Redux
 */

final ActivityReducer = combineReducers<List<Activity>>([TypedReducer<List<Activity>,LoadMoreActivityAction>(_loadMore)]);

List<Activity> _loadMore(List<Activity> list,action) {
  if(action.list!=null) {
    list.addAll(action.list);
  }
  return list;
}

class LoadMoreActivityAction {
  final List<Activity> list;
  LoadMoreActivityAction({this.list});
}